<?php

namespace backend\models\odm;

use Yii;

/**
 * This is the model class for table "xs_novel_category".
 *
 * @property string $cate_id
 * @property integer $cate_main
 * @property string $cate_name
 * @property integer $cate_sort
 * @property integer $cate_status
 * @property string $cate_create_time
 * @property string $cate_update_time
 */
class CateOdm extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'xs_novel_category';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['cate_main'], 'required'],
            [['cate_main', 'cate_sort', 'cate_status'], 'integer'],
            [['cate_create_time', 'cate_update_time'], 'safe'],
            [['cate_name'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'cate_id' => Yii::t('app', 'Cate ID'),
            'cate_main' => Yii::t('app', 'Cate Main'),
            'cate_name' => Yii::t('app', 'Cate Name'),
            'cate_sort' => Yii::t('app', 'Cate Sort'),
            'cate_status' => Yii::t('app', 'Cate Status'),
            'cate_create_time' => Yii::t('app', 'Cate Create Time'),
            'cate_update_time' => Yii::t('app', 'Cate Update Time'),
        ];
    }
}
